package cn.achao.csr.chat.service.impl;

import cn.achao.csr.api.model.dto.PushMessageDTO;
import cn.achao.csr.base.constant.RockMqKeyConstants;
import cn.achao.csr.base.resp.WSBaseResp;
import cn.achao.csr.mq.producer.CsrMqProducer;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 * @Author: achao
 **/
@Slf4j
@Service
@RequiredArgsConstructor
public class PushServiceImpl {

    private final CsrMqProducer mqProducer;


    public void sendPushMsg(WSBaseResp<?> msg) {
        mqProducer.sendMsg(RockMqKeyConstants.PUSH_TOPIC, new PushMessageDTO(msg));
    }
}
